/*! 
 * Implementation file for a gravity force generator.
 *
 * \author Devis Rossini
 * \date 19 March 2012
 */ 
#include "PhxGravityForceGenerator.h"

using namespace phx;

Gravity::Gravity(const Vector3& gravity)
	: mGravity(gravity) { }

void Gravity::UpdateForce(RigidBody* body, real duration)
{
	if (!body->HasFiniteMass()) return;

	body->AddForce(mGravity * body->GetMass());
}